package com.lgx.right.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lgx.common.exception.DataException;
import com.lgx.right.dao.ICardDao;
import com.lgx.right.entity.Card;
import com.lgx.right.service.ICardService;

/**
 * 
 * @author acer
 *
 */
@Service("cardService")
public class CardService implements ICardService {

	@Autowired
	private ICardDao cardDao;

	public ICardDao getCardDao() {
		return cardDao;
	}

	public void setCardDao(ICardDao cardDao) {
		this.cardDao = cardDao;
	}

	public Card createCard(Card card) throws DataException {
		return this.cardDao.createCard(card);
	}

	public Card updateCard(Card card) throws DataException {
		return this.cardDao.updateCard(card);
	}

	public void deleteCard(Card card) throws DataException {
		this.cardDao.deleteCard(card);
	}

	public void deleteCard(String id) throws DataException {
		this.cardDao.deleteCard(id);
	}

	public Card findCardById(String id) {
		return this.cardDao.findCardById(id);
	}

}
